<?php
// $Id: results.tpl.php,v 1.5 2007/10/11 09:51:29 goba Exp $
global $base_url;
   
	//print "<pre>";print_r($results);print"</pre>";
	//print $nid;
?>

<div class="profile-border">
  <div style="border:0px solid red;">
    <div class="profile-right">
      <div class="profile-right-pic">
        <?php  
		$photo=$results[$nid]->field_mp_photo['und'][0]['uri'];
		 
	   $wrapper = file_stream_wrapper_get_instance_by_uri($photo);
       if($wrapper == true){
       $path = $wrapper->getDirectoryPath() . "/" . file_uri_target($photo);
       }
    
    	$img = '<img  src= "http://cms.tn.gov.in//'.$path.'" height="120" width="90" >';
		  print $img;
		//echo $img_path="<img src='".$base_url."/sites/all/themes/customs/citizen/thumb.php?f=0&src=".BASECH_LOCAL."/".$lokdata->filepath."&x=140&y=150'>";
		 ?>
      </div>
      <!--<div  class="profile-mem-name"> <?php //print $results[$nid]->
      title; ?></div>
    -->
    <div  class="profile-mem-name">
      <?php //print $results[$nid]->title; ?>
    </div>
    <div class="clr"></div>
  </div>
  <div class="profile-left">
    <div class="profile-left-head-design">
      <div class="profile-left-head-text"><?php echo t('Name');?></div>
    </div>
    <div class="profile-left-content-text">
      <?php
            print $results[$nid]->title; ?>
    </div>
    <?php  if($results[$nid]->field_profile_assumed['und']['0']['value']!=''  ) { ?>
    <div class="profile-left-head-design">
      <div class="profile-left-head-text"><?php echo t('Designation');?></div>
    </div>
    <div class="profile-left-content-text">
      <?php
            //print $results[$nid]->field_profile_assumed['und']['0']['value']; ?>
    </div>
    <?php } ?>
    <div class="profile-left-head-design">
      <div class="profile-left-head-text"><?php echo t('Position');?></div>
    </div>
    <div class="profile-left-content-text">
      <?php
            print $results[$nid]->field_mp_position['und']['0']['value']; ?>
    </div>
    <div class="profile-left-head-design">
      <div class="profile-left-head-text"><?php echo t('LokSabha Detail');?></div>
    </div>
    <div class="profile-left-content-text">
      <?php
           print $results[$nid]->field_mp_lokshaba['und'][0]['value']; ?>
    </div>
    <div class="profile-left-head-design">
      <div class="profile-left-head-text"><?php echo t('Constituency Name');?></div>
    </div>
    <div class="profile-left-content-text">
      <?php
            print lok_consituancency_name($results[$nid]->field_mp_constituencey_name['und'][0]['value']); ?>
    </div>
    <div class="profile-left-head-design">
      <div class="profile-left-head-text"><?php echo t('Party Name');?></div>
    </div>
    <div class="profile-left-content-text"><?php print  paty_name($results[$nid]->field__mp_party['und'][0]['value']); ?></div>
	
    <?php if($results[$nid]->field_mp_addinfo['und'][0]['value']) { ?>
    <div class="profile-left-head-design">
      <div class="profile-left-head-text"><?php echo t('Additional Information');?></div>
    </div>
    <div class="profile-left-content-text">
      <?php  print $results[$nid]->field_mp_addinfo['und'][0]['value']; ?>
    </div>
    <?Php } ?>
	
    <?php if($results[$nid]->field_mp_address['und'][0]['value']){ ?>
    <div class="profile-left-head-design">
      <div class="profile-left-head-text"><?php echo t('Local Address');?></div>
    </div>
    <div class="profile-left-content-text"><?php print $results[$nid]->field_mp_address['und'][0]['value']; ?></div>
    <?Php } ?>
	
    <?php if($results[$nid]->field_mp_local_phone1['und'][0]['value']){ ?>
    <div class="profile-left-head-design">
      <div class="profile-left-head-text"><?php echo t('Local Telephone Number-1');?></div>
    </div>
    <div class="profile-left-content-text">
      <?php  print $results[$nid]->field_mp_local_phone1_code['und'][0]['value']; ?>
      <?php print $results[$nid]->field_mp_local_phone1['und'][0]['value']; ?></div>
    <?php } ?>
	
    <?php if($results[$nid]->field_mp_local_phone2['und'][0]['value']){ ?>
    <div class="profile-left-head-design">
      <div class="profile-left-head-text"><?php echo t('Local Telephone Number-2');?></div>
    </div>
    <div class="profile-left-content-text">
      <?php  print $results[$nid]->field_mp_local_phone2_code['und'][0]['value']; ?>
      <?php print $results[$nid]->field_mp_local_phone2['und'][0]['value']; ?></div>
    <?php } ?>
	
    <?php if($results[$nid]->field_mp_add_delhi['und'][0]['value']){ ?>
    <div class="profile-left-head-design">
      <div class="profile-left-head-text"><?php echo t('Delhi Address');?></div>
    </div>
    <div class="profile-left-content-text"><?php print $results[$nid]->field_mp_add_delhi['und'][0]['value']; ?></div>
    <?php } ?>
    <?php if($results[$nid]->field_mp_phone_delhi['und'][0]['value']){  ?>
    <div class="profile-left-head-design">
      <div class="profile-left-head-text"><?php echo t('Delhi Telephone Number-1');?></div>
    </div>
    <div class="profile-left-content-text"><?php print $results[$nid]->field_mp_delhi_phone2_code['und'][0]['value']; ?><?php print $results[$nid]->field_mp_phone_delhi['und'][0]['value']; ?></div>
    <?php } ?>
	
    <?php if($results[$nid]->field_mp_phone2_delhi['und'][0]['value']){ ?>
    <div class="profile-left-head-design">
      <div class="profile-left-head-text"><?php echo t('Delhi Telephone Number-2');?></div>
    </div>
    <div class="profile-left-content-text"><?php print $results[$nid]->field_mp_delhi_phone2_code['und'][0]['value']; ?> <?php print $results[$nid]->field_mp_phone2_delhi['und'][0]['value']; ?></div>
    <?php } ?>
    <?PHP  if($results[$nid]->field_mp_fax['und'][0]['value']){ ?>
    <div class="profile-left-head-design">
      <div class="profile-left-head-text"><?php echo t('Fax');?></div>
    </div>
    <div class="profile-left-content-text"><?php print $results[$nid]->field_mp_fax['und']['0']['value'];
	    ?>
      <?php  print $results[$nid]->field_mp_fax['und']['0']['value']; ?>
    </div>
    <?php } ?>
    <?php if($results[$nid]->field_mp_email['und'][0]['value']){ ?>
    <div class="profile-left-head-design">
      <div class="profile-left-head-text"><?php echo t('E-Mail');?></div>
    </div>
    <div class="profile-left-content-text"><?php print $results[$nid]->field_mp_email['und'][0]['value']; ?></div>
    <?php } ?>
    <?php if($results[$nid]->field_mp_website_value){  ?>
    <div class="profile-left-head-design">
      <div class="profile-left-head-text"><?php echo t('Website URL');?></div>
    </div>
    <div class="profile-left-content-text">
      <?php $filepath=$lokdata->field_mp_website_value;?>
      <a href='javascript:void(0);' onClick='return tnportal_ext_window("<?php print $results[$nid]->field_mp_website;?>");'><?php print $results[$nid]->field_mp_website; ?></a></div>
    <?php } ?>
  </div>
  <div class="clr"></div>
</div>
<div style='text-align:right;padding-right:10px;'><img src="<?php echo $base_url.'/sites/default/files/back.jpg' ; ?>"  onclick="window.history.go(-1);"  style='cursor:pointer;'   alt='Go Back' title='Go Back' /> </div>
</div>
